<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('think', function () {
    return 'hello,ThinkPHP5!';
});

Route::get('hello/:name', 'index/hello');

// 这个路由定义，感觉有问题
// 不是有问题，问题很大，模块、控制器、参数名的对应全部错误
// Route::rule('cases/:index','Index/cases/index','GET|POST');


// 模板中的部分url函数使用不恰当，麻烦参考改正
// 原因:不能根据路由规则生成url



// 默认为第一条
Route::get('cate/[:cate]', 'index/Category/index');
Route::get('article/:id', 'index/Category/detail');
// 不同的分类如何生成不同的路由?通过附加参数，但是附加参数会丧失灵活性
/*
Route::get('case/[:cate]', 'index/Category/index?group=1');
Route::get('news/[:cate]', 'index/Category/index?group=2');
Route::get('qaq/[:cate]', 'index/Category/index?group=3');
*/



Route::get('about', 'index/Index/about');
Route::get('contact', 'index/Index/contact');
Route::get('', 'index/Index/index');

